#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long LL;
int main()
{
	int ma = -1e9;
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		int x;
		cin >> x;
		ma = max(ma, x);
	}
	cout << ma << endl;
	return 0;
}